home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1996 #15 / Monster Media Number 15 (Monster Media)(July 1996).ISO / prog_gen / t4diblib.zip / ANIMATE6.F4_ / ANIMATE6.F4
Text File  |  1995-12-11  |  3KB  |  107 lines

  1. VERSION 4.00
  2. Begin VB.Form Form1 
  3.    Appearance      =   0  'Flat
  4.    BackColor       =   &H80000005&
  5.    Caption         =   "ANIMATE6"
  6.    ClientHeight    =   1692
  7.    ClientLeft      =   2628
  8.    ClientTop       =   2688
  9.    ClientWidth     =   2772
  10.    BeginProperty Font 
  11.       name            =   "MS Sans Serif"
  12.       charset         =   1
  13.       weight          =   700
  14.       size            =   7.8
  15.       underline       =   0   'False
  16.       italic          =   0   'False
  17.       strikethrough   =   0   'False
  18.    EndProperty
  19.    ForeColor       =   &H80000008&
  20.    Height          =   2112
  21.    Left            =   2580
  22.    LinkTopic       =   "Form1"
  23.    ScaleHeight     =   1692
  24.    ScaleWidth      =   2772
  25.    Top             =   2316
  26.    Width           =   2868
  27.    Begin VBX.T4DILIB dilib1 
  28.       Caption         =   "dilib1"
  29.       ControlMode     =   0  'Lib -> PIC
  30.       Height          =   372
  31.       Left            =   1680
  32.       Top             =   1200
  33.       Visible         =   0   'False
  34.       Width           =   972
  35.    End
  36.    Begin VB.CommandButton Command1 
  37.       Appearance      =   0  'Flat
  38.       BackColor       =   &H80000005&
  39.       Caption         =   "&Quit"
  40.       Height          =   372
  41.       Left            =   120
  42.       TabIndex        =   0
  43.       Top             =   1200
  44.       Width           =   1452
  45.    End
  46. End
  47. Attribute VB_Name = "Form1"
  48. Attribute VB_Creatable = False
  49. Attribute VB_Exposed = False
  50. Option Explicit
  51. Private Declare Function GetFreeSpace& Lib "kernel" (ByVal x%)
  52. Dim TimeIn!
  53. Dim Frames%
  54.  
  55. Private Sub Command1_Click()
  56.  Terminate
  57. End Sub
  58.  
  59. Private Sub Form_Load()
  60. Dim loopctr%, memctr%
  61.  Top = (Screen.Height - Height) / 2!
  62.  Left = (Screen.Width - Width) / 2!
  63.  Show
  64.  Frames = 0
  65.  TimeIn = Timer
  66.  For loopctr = 1 To 50
  67. 'Open BLUESPIN
  68.   dilib1.LibraryName = "bluespin.ilb"
  69.   dilib1.Action = IM_ACTION_OPENLIBRARY
  70. 'Show all BLUESPIN members
  71.   For memctr = 1 To dilib1.MemberCount
  72.    dilib1.MemberNumber = memctr
  73.    dilib1.Action = IM_ACTION_GETMEMBER
  74.    Picture = dilib1.Picture
  75.    Frames = Frames + 1
  76.   Next memctr
  77. 'Open REDSPIN
  78.   dilib1.LibraryName = "redspin.ilb"
  79.   dilib1.Action = IM_ACTION_OPENLIBRARY
  80. 'Show all REDSPIN members
  81.   For memctr = 1 To dilib1.MemberCount
  82.    dilib1.MemberNumber = memctr
  83.    dilib1.Action = IM_ACTION_GETMEMBER
  84.    Picture = dilib1.Picture
  85.    Frames = Frames + 1
  86.   Next memctr
  87.   DoEvents
  88.  Next loopctr
  89.  Terminate
  90. End Sub
  91.  
  92. Private Sub Form_Unload(Cancel As Integer)
  93.  End
  94. End Sub
  95.  
  96. Private Sub Terminate()
  97. Dim TimeOut!, TimeElapsed!, fps!
  98.  TimeOut = Timer
  99.  TimeElapsed = TimeOut - TimeIn
  100.  fps = Frames
  101.  fps = Frames / TimeElapsed
  102.  MsgBox Trim$(Str$(fps)) + " frames per second."
  103.  End
  104. End Sub
  105.  
  106.  
  107.